@model System.Collections.Generic.IEnumerable<Omu.AwesomeDemo.Core.Model.Person>
@using Omu.AwesomeDemo.WebUI.Controllers

@foreach (var o in Model)
   {
<tr id='o@(o.Id)'>
    <td>
        @o.FirstName
    </td>
    <td>
        @o.LastName
    </td>
    <td>
        @o.Login
    </td>
    <td>
    @(o.Hobbies!= null ? string.Join(",",o.Hobbies.Select(v => v.Name)) : "")
    </td>
    <td>
        @o.DateOfBirth.ToShortDateString()
    </td>   
    <td>
        @(o.Home ?? new Country())
    </td>
    <td>
        @(Html.PopupFormActionLink<PersonController>(a => a.Edit(o.Id), htmlAttributes: new { @class = "abtn" }))
    </td>
    <td>
        <form method="post" action="@Url.Action("Delete",new{o.Id})" class="fconfirm">
        <input type="submit" value="delete" class="confirm" />
        </form>
    </td>
</tr>
}
